package com.gengzi.upload.service.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 董诗攀
 */
@Api(value="文件上传",tags={"管理员操作"})
public interface UploadControllerApi {

    /**
     * 上传图片
     * @param file 准备上传的文件
     * @return 返回上传后图片的路径
     */
    @ApiOperation(value = "上传图片", notes = "上传图片", httpMethod = "POST")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "上传成功！"),
            @ApiResponse(code = 500, message = "上传失败！")
    })
    ResponseEntity<String> uploadImage(MultipartFile file);
}
